﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesGLApp.DAL.MesDB
{
    [Serializable]
    [Table("site_info")]
    public class SiteInfo
    {
        /// <summary>
        /// id，主键，自增长
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Column("id")]
        public int ID { get; set; }

        /// <summary>
        /// 站点代号
        /// </summary>
        [Column("site_code")]
        public string SiteCode { get; set; }

        /// <summary>
        /// 站点名称
        /// </summary>
        [Column("site_name")]
        public string SiteName { get; set; }

        /// <summary>
        /// 站点简称
        /// </summary>
        [Column("site_sn")]
        public string SiteShortName { get; set; }

        /// <summary>
        /// 父节点
        /// </summary>
        [Column("parent_id")]
        public int ParentID { get; set; }

        /// <summary>
        /// 是否删除，0代表该站点正常使用，1代表已经删除不再使用
        /// </summary>
        [Column("is_del")]
        public int IsDel { get; set; }

        /// <summary>
        /// 是否最终节点，0代表该站点下还有子站点，1则反之
        /// </summary>
        [Column("is_final")]
        public int IsFinal { get; set; }


        /// <summary>
        /// 有效工时计算的起止点标识，B代表计算工时的起点，E代表计算工时的结束点
        /// </summary>
        [Column("cal_point")]
        public string CalPoint { get; set; }


        /// <summary>
        /// 站点的默认状态
        /// </summary>
        [Column("def_status")]
        public int? DefStatus { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; }


        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime? CreateDate { get; set; }
        /// <summary>
        /// 部门ID
        /// 绑定部门
        /// </summary>
        [Column("dept_id")]
        public int deptId { get; set; }
    }
}
